-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[clang][SYCL] Add sycl_external attribute and restrict emitting device code #140282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @schittir! I completed an initial pass of all of the code, but still need to look more closely at the documentation updates.
Thank you for the initial pass review, Tom! |
✅ With the latest revision this PR passed the C/C++ code formatter. |
Support for functions is sufficient for SYCL 2020 spec conformance.
Co-authored-by: Mariya Podchishchaeva <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @schittir, here are my initial review comments. I expect to review the newly added tests more closely once these comments are all addressed.
Oops new tests are failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good @schittir! I added some comments for minor issues. I still need to review the tests more closely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more comments. I still haven't finished my review of sycl-external-attr.cpp
, but will try to later today or over the weekend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finished an initial pass through all of the tests. I'll do another round once you've had a chance to catch up on the comments so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great @schittir! I just realized that, since we made the change to allow the attribute to be present during host compilation that we should no longer restrict diagnostics to device compilation and that tests should exercise host compilation as well.
I suggested a few FIXME comments, but other than that, I think this is good to go!
Thank you for the review, Tom! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it @schittir, this looks great!
@erichkeane, @bader, please review and lend your approval. Note that some of the changes to the tests are to synchronize them with continued evolution that happened in DPC++ but was not previously upstreamed.
This patch is part of the upstreaming effort for supporting SYCL language front end.
It makes the following changes:
This patch is missing diagnostics for the following diagnostics listed in the SYCL 2020 specification's section 5.10.1, which will be addressed in a subsequent PR:
Functions that are declared using SYCL_EXTERNAL have the following additional restrictions beyond those imposed on other device functions: